<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>添加课程</title>
    <link rel="stylesheet" href="/layui/css/layui.css">
    <script src="/layui/src/layui.js"></script>
    <script src="/layui/src/jquery-3.2.1.min.js"></script>
    <link rel="stylesheet" href="css/CourseAdd.css">
    <script type="text/javascript" src="js/CourseAdd.js"></script>

</head>
<body>
<div class="layui-container">
    <!--头部-->
    <div class="layui-row" id="List_Header">
        <div class="layui-col-xs11 layui-col-sm11 layui-col-md11 layui-col-lg11">
            <span id="color_id">▉</span>
            <span id="List_Header_span">添加课程</span>
        </div>
        <div class="layui-col-xs1 layui-col-sm1 layui-col-md1 layui-col-lg1">
            <button type="button" class="layui-btn layui-btn-primary layui-border-black layui-btn-sm List_Header_button" onclick="go()">
                <i class="layui-icon layui-icon-left"></i> 返回
            </button>
        </div>
    </div>
    <!--表单-->
    <form class="layui-form "  id="form_id">
        <!--图片-->
        <div id="img_div">
            <img src="../img/CourseAdd.png" id="ProductAddImg"/>
        </div>
        <div id="div_id">
            <!--课程分类-->
            <div class="layui-form-item">
                <label class="layui-form-label">课程分类：</label>
                <div class="layui-input-block">
                    <input type="text" name="className" required lay-verify="required"  autocomplete="off" class="layui-input" disabled="disabled" id="categoryId"/>
                    <input type="hidden" name="classId" required lay-verify="required"  autocomplete="off" class="layui-input" />
                    <img src="../img/icon27.gif" width="20px" height="20px" id="icon27_id" onclick="addProductCategory()"/>
                </div>
            </div>
            <p id="p_id">您当前选择的商品类别是：<span></span></p>

            <!--课程名称-->
            <div class="layui-form-item">
                <label class="layui-form-label">课程名称：</label>
                <div class="layui-input-block">
                    <input type="text" name="courseName" id="courseName" required lay-verify="required"  autocomplete="off" class="layui-input" ID="productName"/>
                </div>
            </div>


            <!--课程图片-->
            <div class="layui-form-item upload_div">
                <label class="layui-form-label">课程图片：</label>
                <div class="layui-input-block">
                    <button type="button" class="layui-btn upload_btn" id="uploadImgBtn">上传图片</button>
                </div>
            </div>

            <!--获取商品主图-->
            <input type="hidden" id="url" name="url" class="layui-input"/>

            <!--预览图-->
            <div class="layui-form-item" id="img_div2">
                <label class="layui-form-label">预览图：</label>
                <div id="img_div3">
                    <div class="layui-input-block" id="img_div4">
                        <i class="layui-icon layui-icon-up" id="up" onclick="upUploadImg()"></i>
                    </div>
                </div>
            </div>



            <!--课程视频-->
            <div class="layui-form-item upload_div">
                <label class="layui-form-label">课程视频：</label>
                <div class="layui-input-block">
                    <button type="button" class="layui-btn upload_btn" onclick="uploadBtn()">上传视频</button>
                    <input type="hidden" id="uploadBtn2"/>
                </div>
            </div>
            <!--上传视频-->
            <div class="layui-form-item" id="div_video">

            </div>
            <input type="hidden" id="courseUrl" name="courseUrl"/>


            <!--课程介绍-->
            <div class="layui-form-item">
                <label class="layui-form-label">课程介绍：</label>
                <div class="layui-input-block">
                    <textarea class="layui-textarea textarea" name="courseIntro" id="product_description" placeholder="请输入内容"></textarea>
                </div>
            </div>

            <!--课程标签-->
            <div class="layui-form-item">
                <label class="layui-form-label">课程标签：</label>
                <div class="layui-input-block">
                    <textarea class="layui-textarea textarea" name="courseLabel" id="product_description2" placeholder="请输入标签"></textarea>
                </div>
            </div>
            <!--课程序号-->
            <div class="layui-form-item">
                <label class="layui-form-label">课程序号：</label>
                <div class="layui-input-block">
                    <input type="text" name="courseNo" required lay-verify="required"  name="courseNo" autocomplete="off" class="layui-input" oninput = "value=value.replace(/[^\d]/g,'')"/>
                </div>
            </div>
            <!--课程售价-->
            <div class="layui-form-item">
                <label class="layui-form-label">课程售价：</label>
                <div class="layui-input-block">
                    <input type="text" name="courseNprice" required lay-verify="required" name="currentpriceProduct" autocomplete="off" class="layui-input"/>
                </div>
            </div>

            <!--课程推荐-->
            <div class="layui-form-item radio_class">
                <label class="layui-form-label">课程推荐：</label>
                <div class="layui-input-block">
                    <input type="radio" name="recommend" value="2" title="新品" checked="checked"/>
                    <input type="radio" name="recommend" value="3" title="推荐"/>
                    <input type="radio" name="recommend" value="4" title="其它"/>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-input-block" id="btn_id">
                    <button class="layui-btn" lay-submit lay-filter="formDemo">完成，提交课程</button>
                </div>
            </div>

            <!--上架状态-->
            <input type="hidden" name="courseStatus" value="3"/>

            <input type="hidden" name="courseCstatus" value="3">
        </div>
    </form>
</div>

<!--预览图点击计数-->
<input type="hidden" id="num"/>

</body>
</html>
